package com.haotian.redis.basic;

import java.util.Set;

import com.haotian.redis.base.RedisSentinelAndSimpleBaseHash;
import com.haotian.redis.config._RedisConfig;
import com.haotian.redis.pool.RedisSentinelAndBasicPool;

import redis.clients.jedis.HostAndPort;

public class _RedisHash extends RedisSentinelAndSimpleBaseHash {

	/**
	 * @param config
	 *            {@link com.haotian.redis._RedisConfig} 核心配置
	 * @param hostAndPort
	 *            {@link redis.clients.jedis.HostAndPort} 地址
	 * @param password
	 *            密码可为null
	 * @param timeOut
	 *            读取写入的超时时间 毫秒
	 * @return
	 * 
	 */
	/**
	 * @param nodes
	 * @param password
	 * @param timeOut
	 * @param config
	 */
	public _RedisHash(Set<HostAndPort> nodes, String password, int timeOut, _RedisConfig config) {
		super.pool = new RedisSentinelAndBasicPool.Builder().setAddr(nodes)
				.setPassWord(password).setRedisTimeOut(timeOut).build(config);
	}

}
